import React from 'react';
import "./index.less";
import {
    Button
} from "antd-mobile";
import { useNavigate, useLocation } from "react-router-dom";
import PageHeaderNew from '../PageHeaderNew';


function IconBox({ image = "/images/handOk.png", header='', topTitle="提交成功", title = "请等待社区反馈" ,navigateUrl=-1}) {
    const navigate = useNavigate();

    return (
        <div>
            <PageHeaderNew title={header} goBack={() => navigate(navigateUrl)} />
            <div className='allBgc' >
            <div className='centerBgc'
                style={{ backgroundImage: `url('${image}')` }}
            ></div>
            <div className='centerTitleBig'>{topTitle}</div>
            <div className='centerTitle'>{title}</div>
            <div className='backBtn'>
                <div
                    onClick={() => {
                        navigate(navigateUrl);
                    }}
                >返回</div>
            </div>
        </div>
        </div>

    );
}

export default IconBox;
